<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>	
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%-- <%@include file="/common/common.jspf" %> --%>
<%-- <script type="text/javascript" src="${ctx}/js/jquery/jquery-1.8.3.js"></script> --%>
<script type="text/javascript">	
	$(function(){
		$(".confirm").click("click", function() {		
				$(this).siblings().eq(0).val(1);
				var s = $(this).siblings().eq(0).val();
				 
					if (s == '1') {
						$(this).attr("disabled",true);
						layer.msg('操作成功');	
					} else {
						layer.msg('操作失败');
					}
			
		});
		$(".noConfirm").click("click", function() {
			$(this).siblings().eq(0).val(2);
			var no = $(this).siblings().eq(0).val();
			if (no == '2') {
				layer.msg('操作成功');	
				$(this).prev().attr("disabled",false);
			} else {
				layer.msg('操作失败');
			}	
		});
	});
</script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/forming/changeshifts/inspect_add.js">
</script>

<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}
label[class^="btn btn-default"]{
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${pageContext.request.contextPath}/handover/inspect_confirmAdd.shtml">
		<section class="panel panel-default">	
			 <div class="form-group">
				<label class="col-sm-3 control-label">机台号：</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入机台号"
						name="changeshifts.Machine_Number">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
				<div class="form-group">
				<label class="col-sm-3 control-label">模具号：</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" placeholder="请输入模具号"
						name="changeshifts.Mold_Number">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>					
			<div class="panel panel-default">
				<div class="panel-body">
					<table class="table table-bordered">
						<thead>
						<c:forEach var="key" items="${inspection}">
							<tr>
								<th colspan="6" style="text-align: center ;">${key.Check_Inspection} </th>	
							</tr>
							<tr>
							
							<c:forEach var="c" items="${checkContent}">
							<c:if test="${key.id == c.InspectionId}">
								<td colspan="1">
								<input class="form-control checkacc" value="${c.Check_Content}" readonly="readonly"
								name="changeshifts.Check_Content" ></td>
								
								<td colspan="1">
								<input type="hidden" class="form-control checkacc" value="2"
								name="changeshifts.SpotCheck" >
								<input type="button" class="btn btn-primary confirm"  value="确认">
								<input type="button" class="btn btn-primary noConfirm"  value="不确认"></td>
							</c:if>
							</c:forEach>
							</tr>
							
						</c:forEach>
						</thead>
						<tbody id="tbl">						
						</tbody>
					</table>
				</div>
			</div> 
		<footer class="panel-footer text-right bg-light lter">
			<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> 
		</section>
	</form>
</body>
</html>